<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>顶部导航</title>
    <link rel="stylesheet" href="../basestyle.css">
    <link rel="stylesheet" href="./navbar.css">
</head>
<body>
<div class="page js_show">
    <div class="page__bd" style="height: 100%;">
        <div class="tab">
            <div class="navbar">
                <div class="navbar__item">
                    选项一
                </div>
                <div class="navbar__item bar__item_on">
                    选项二
                </div>
                <div class="navbar__item">
                    选项三
                </div>
                <div class="navbar__item">
                    选项四
                </div>
            </div>
            <div class="tab__panel">

            </div>
        </div>
    </div>
</div>
<script src="../zepto.min.js"></script>
<script>
    $(".navbar__item").click(function () {
        $(this).addClass("bar__item_on").siblings().removeClass("bar__item_on");
    })
</script>
</body>
</html>